package com.bestcem.xm.member.grpc.service.param.imports;

import com.bestcem.xm.common.core.constant.RegTypes;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.List;

/**
 * 联系人导入 参数校验
 *
 * @author yf.wang <yf.wang@idiaoyan.com>
 * @version V1.0
 * @date 2021/7/21
 */
@Getter
@Setter
public class ImportMembersParam {

    /**
     * 组织ID
     */
    @NotNull(message = "组织ID不能为空")
    @Pattern(regexp = RegTypes.OBJECT_ID, message = "组织ID格式错误")
    private String orgId;

    /**
     * 组织ID
     */
    @NotNull(message = "用户ID不能为空")
    @Pattern(regexp = RegTypes.OBJECT_ID, message = "组织ID格式错误")
    private String userId;

    @NotNull(message = "联系人类型不能为空")
    private Integer attribute;

    @NotNull(message = "联系人匹配参数不能我欸空")
    private String primaryKey;

    @NotNull(message = "导入方式不能为空")
    private Integer importType;

    @NotNull(message = "")
    private Boolean existedUpdate;

    @NotNull(message = "")
    private Boolean nullUpdate;

    @NotNull(message = "文件路径不能为空")
    private String fileUrl;

    private Boolean isFree;

    private List<String> headers;

    private String recordId;
}
